#ifndef POINTCLOUDSIMULATOR_H
#define POINTCLOUDSIMULATOR_H

#include <QObject>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>



class PointCloudSimulator : public QObject
{
    Q_OBJECT
public:
    explicit PointCloudSimulator(QObject *parent = nullptr);
    void start();
    void stop();
signals:
    void pointCloudUpdated(const std::shared_ptr<pcl::PointCloud<pcl::PointXYZ>>& cloud);

private slots:
    void generatePointCloud();

private:
    QTimer* m_timer = nullptr;
    int m_width = 640;
    int m_height = 480;
    float m_frequency = 30.0f;

    pcl::PointCloud<pcl::PointXYZ>::Ptr createSimulatedCloud();
};

#endif // POINTCLOUDSIMULATOR_H
